

#delimit ;
**********Do not run on its own ;
**********This is called up in 1a file ;

label define occ1_harm 
1 "Accountants and Auditors"
2 "Clergymen"
3 "Public-school teachers"
5 "Dentists"
6 "Physicians and surgeons"
7 "Engineers"
8 "Lawyers and judges"
9 "Social and welfare workers"
10 "Nurses (trained or student)"
17 "Other professional and technical" 
18 "Semi-professional"
21 "Self-employed businessmen, managers, and officials"
28 "Businessmen, managers, and officials"
30 "Bookkeeper"
31 "Stenographers, typists, secretaries"
32 "Other clerical workers"
34 "Sales: high-status, traveling or ‘outside’ goods and services"
35 "Sales: inside sales, salesman, clerk"
36 "Sales: low-status, outside (e.g., newsboys, peddlers)"
42 "Foremen"
48 "Craftsmen and kindred workers (skilled)"
51 "Operatives and kindred workers (semi-skilled)"
61 "Protective service officers"
65 "Private household workers"
68 "Other service workers"
71 "Farm laborers"
78 "Unskilled non-farm laborers"
81 "Farm Operators" 
999 "Un-codeable";
label values occ1_harm occ1_harm ;

***** Accountant ;
replace occ1_harm=1 if occ1=="accountant" | occ1=="auditor" |occ1=="cpa" ;
replace occ1_harm=1 if strpos(occ1, "accountant")~=0 /*i checked and these look good*/ ;
replace occ1_harm=1 if occ1=="central station accounting" ;
replace occ1_harm=1 if occ1=="acctant" ;
replace occ1_harm=1 if occ1=="sccountant" ;
replace occ1_harm=1 if occ1=="deputy auditor" ;
replace occ1_harm=1 if occ1=="traveling auditor" ;
replace occ1_harm=1 if occ1=="us forrest service auditor" ;

****Clergy ;
replace occ1_harm=2 if occ1=="priest" | occ1=="clergy" | occ1=="minister" | occ1=="clergyman" | occ1=="preacher" | occ1=="pastor" | regexm(occ1, "clergyman") ;
replace occ1_harm=3 if strpos(occ1, "teacher")~=0 ;

****Dentists ;
replace occ1_harm=5 if occ1=="dentist" | occ1=="dentis" | occ1=="dentistry"
| occ1=="demtist" | occ1=="dental technician" | occ1=="dental mechanic" |
occ1=="dental technitive" ;

***Doctors/surgeons ;
replace occ1_harm=6 if occ1=="doctor" | occ1=="physician" | occ1=="surgeon"
| occ1=="phsician/surgeon" | occ1=="physical surgeon" | occ1=="physician-surgeon"
| occ1=="physician/surgeon" | occ1=="medical doctor" ;

***Engineers ;
replace occ1_harm=7 if strpos(occ1, "engineer")~=0 | occ1=="civil enginner" | occ1=="developing eng" | occ1=="stat. engr." | occ1=="head engineer/superintendent" ;

***Lawyers / judges ;
replace occ1_harm=8 if strpos(occ1, "attorney")~=0 | strpos(occ1, "lawyer")~=0
| strpos(occ1, "judge")~=0 | occ1=="deputy county attor." | occ1=="gen. practice" ;

****Social & welfare workers ;
replace occ1_harm=9 if occ1=="case worker" | occ1=="works director" | occ1=="social investigator" | occ1=="social worker" ;
**Note the `works director' works for the WPA so put here ;

***Nurses (will pick up everyone, including assistants) ;
replace occ1_harm=10 if strpos(occ1, "nurse")~=0 ;

***Book-keeper ;
replace occ1_harm=30 if occ1=="bookkeeper" | occ1=="bookeeper" | occ1=="bookkeeper and rent collector" | occ1=="bookkeeper clerk" | occ1=="bookkepper"
| occ1=="book keeper" | occ1=="bookkeeping" | occ1=="head bookeepper" | occ1=="salesman's bookkeeper" 
| occ1=="bookkeeper and mechanic" ;


***Foreman (including assistant foreman)? ;
replace occ1_harm=42 if strpos(occ1, "foreman")~=0 ;
replace occ1_harm=42 if strpos(occ1, "forman")~=0 ;

replace occ1_harm=65 if occ1=="domestic" ;

****Treaveling Salesmen ;
replace occ1_harm=34 if strpos(occ1, "sales")~=0 & strpos(occ1, "trav")~=0 ;

local occ_17_list=`"actor actress architect artist "commercial artist" "creative artist" "scenic artist" "sign artist" "grand opera singer" author chemist geoglist mathematician scientist professor instructor editor reporter veterinarian librarian musician drugist druggist druggiest druggest drummer optometrist pianist muscian headmaster "assistant headmaster" "assistant chemist" "metalurgical chemist"
"assistant editor" "associate professor" "prof. of field crops." "college instructor" "assistant entomologist"  "chemist/ medical research"  "laboratory attendant"  "director of music" "director of admissions" "divisional director of immigration and naturalization" "staff editor"
"jobbing musician"  "staff artist/ singer" "agent income tax"
principal prncipal  "professor of medicine" "internal revenue agent" 
"laboratory assistant"  "treasurer" "custom's inspector" "statistician"
"field rep (appraiser)" "appraisor"  "research worker"  "pro golf" "high school prin." 
"health officer" "metalurgy professor" "vnational officer" "entertainer==actor"
"history instructor"  "deputy assesor" psychologist "deputy tax assessor"
"deputy county treasurer" "trans. relief air." "recruting seargent" deputy 
"education advisor" "union business agent" lecturer "councilman"
commissioner "street commissioner" "road commissioner" "asst. supt" 
"tax field man" legislator  assessor  "dean of men" "regional custodian of rural rehabilitation"  "newspaper editor" "county official" "county officer" "boy scout executive" "proof reader"
"copy editor" "notary public" "abstractor" "bank examiner" "bamk examiner" "' ;


/***** ;
replace occ1950ej=18 if occ1950==2 | occ1950==5 | occ1950==8 | occ1950==71 ///
	| occ1950==73 | occ1950==31 | (occ1950>=33 & occ1950<=35) | occ1950==74 ///
	| occ1950==76 | occ1950==78 | (occ1950>=51 & occ1950<=54) | occ1950==91 ///
	| occ1950==92 | (occ1950>=94 & occ1950<=97) *****/ ;

local occ_18_list `"pilot navigator athlete chiropractor chiropodist osteopath pharmacist pharmicist "registered pharmacist" dancer "x-ray operator"
designer photographer "radio operator" "radio technician" entertainer "farm advisor" forester forrester  "funeral director" "assistant funeral  director" embalmer mortician undertaker surveyor technician therapist healer draftsman draughtman "surveyor--make and tire insurance rates"
draftsman/surveyor draftsmanb "mechanical draftsman" "sheet metal worker/draftsman" "observer"

 "' ;

 
 
****Managers, self employed ;

***Self-employed business types ;
local occ_21_list `"proprietor proprieter propritor merchant "commission merchant" "own real estate" owner wner "owner and manager" "owner manager" "owner,manager" "owner--pharmacist" "merchant and proprietor" partner
"owner-manager" "owner/barber" "owner/manager" "owner/operator" "owner/tire and battery" "owner/veteranarian" "ownes, operates" co-owner co-partner
"co-patrner and manager" co-proprietor manager/owner "part owner" "merchant part owner" "hauling  owner" "leased mgr oil station" "cigar store" "proprnitor"
"proprietor and manager" "broker meat" "commission merchant" "manager, owner"
"manager/merchant" "manager -  gasoline station" "manufacturer"  maufacturing 
"retail merchant" "president of company" "restaurant owner"
"part owner (1/3)" grocer "grocery store" "coal dealer" "notions vendor"  "prop"   
"operator department store" "cattle buying and sales" "cemetery memorials"
"pool hall operator" "proprietor meat market" "shoe merchant" "operator saw mill"
"saw mill operator" "poultry dealer" "concession stand" "automobile dealer"
"tavern keeper"  "meal market" "lumber dealer" "wood dealer" "auto dealer"
"ice and coal dealer"  "well driller" "independent retail merchant" "storekeeper"
"glass manufacturer"  "proprietor and salesman" "taxi rpoprietor" "food distributor"  "' ;


 
***Non-self-employe business types ;
local occ_28_list `"manager businessman president "investment banker" 
"branch manager" "department manager" "dept. manager" "department head --collecting"  "district manager" "district supervisor" "factory manager" "general manager"
"mgr adv dept" "mgr." "office manager" "office maanager" "office supervisor"
"plant manager" "plant mgr." "president & manager" president 
"production manager" "post master" "postmaster" buyer shipper "shoe buyer"
"assistant manager" "assistant mamager" "assistant branch manager"
"assistant vice president" "asst manager\" "business manager" 
"advertising manager" "asst supt." "asst. supt." 
"asst. manager" "agency director" "credit manager" "dist mgr."
"dist sales mgr." "distributing manager" "distributor" "distrubiting manager"
"warehouse manager"  "regional manager" "manager subcription department"
"supt" "cattle buyer" "sheep buyer" "vice pres"  "manager/job printing dept."
"mamnager" "gen manager" "star manager" "cr. manager" "local manager"
"produce buyer" "vice-president"  "genl magr" "assistant superintendant"
"supt apt" paymaster "superintendant"  "yard master" "yard conductor"  "official vice pres" "assistant treasurer"  "bank president"  "sec. treasurer" "productio mamager"  "' ;



/*** Clerical 1 ;
replace occ1950ej=32 if occ1950>=300 & occ1950<=390
***/ ;

local occ_31_list `"typist stenographer secretary "assistant secretary" "' ;


**** CLERICAL 2 ;
/* replace occ1950ej=32 if occ1950>=300 & occ1950<=390 */ ;

local occ_32_list `"attendent "mail carrier" "rural mail carrier" "letter carrier"  "station attendent"
"city letter carrier" "registered mail carrier" "mail courier" postman teller cashier "bill collector" messenger messanger "office boy" "ticket agent" "telegraph operator" telegrapher "telephone operator" "telephone (relief operator)" "testboard man" "station agent" attendant "attendant and helper" clerk dispatcher dispactcher "train dispatcher" "engine dispatcher"  agent "assistant general agent" "chief clerk" "chief clerk--livestock freight office" "bank clerk" "billing clerk" "commercial agent" "law clerk" "mail clerk" "number assignment clerk"  "office clerk" "court reporter"
"offic manager" "office agent" "office assistant" "office file clerk" "office worker" "order clerk" "accounting clerk"  "ara clerk" "gen off. clerk"
"stock clerk"  "bond clerk" "claim clerk" "shipping clerk" "shipping clkerk" "rate clerk" "assistant cashier" "cashier/paymaster" "special delivery messenger"
"contract man" "postal clerrk"  "purchasing agent"  "clerical" clercial
"travelling passenger agent" "meter reader" "meter inspector" "electric meter reader"
"meter reader man" "passenger agent" "special sgent" "service mgr" "general secretary"  secy. "executive secretary" "executivesect. & treas."  "private secretary" "secretary and treasurer" "clerical general office worke" "rental agent"
"sales and service agent"  "justice of peace" "' ;  


/* Sales
replace occ1950ej=34 if occ1950==410 | occ1950==420 | occ1950==400 | ///
	occ1950==450 | occ1950==470 | occ1950==480 **/ ;

****High end sales ;	
local occ_34_list `"auctioneer demonstrator "advertising agent" "insurance agent"  
"insurance broker" "insurance broker--salesman" "real estate agent" "real estae agent" "real estate broker" "real eatate broker" realtor "stock broker" 
"stock agent" "stock buyer" "bond salesman" broker "advertising mgrt." "advertising salesman"
"advertising solicitor specialist" "solicitor and field agent" "insurance salesman" "insuranc agent"
"life insurance salesman"  autctioneer "machinery salesman"
 salesman "district sales supervisor" "electrical salesman"
 "automobile salesman" "cattle salesman" "travelling supply clerk"
 "asst sales manager" "house to house salesman" "sales director"
 "route salesman" "sales manager" "slaes manager" "sales promotion manager"
 "sales man" "commercial salesman" "soliciter & salesman" "sales agent"
 "commission man" "solicitor" "confectionery salesman" "general salesman" "wholesale salesman"  "electrical appliance salesman"  "retail sales mgr."
"cattle buying and sales"  "gas salesman" "distributing salesman" "auto salesman"
"mining promotion" "commercial traveler" "freight solicitor"  "';



***Middle sales ;
local occ_35_list `"salesman saleslady salesclerk "sales clerk" saleman
saalesman "sales and delivery" "city salesman" "ity salesman" "floor salesman" 
"assistant manager city salesman" "assistant sales manager"
"assistant sales manger" "assistant salesmanager"
"outside  salesman" "outside salesman" "outside solicitor" "delivery salesman"
"meat peddlar" "milk salesman" "retail city salesman" "inside salesman"
 "oil salesman"  "salesman (radio)" "yarn salesman" "clothing salesman" "retail salesman"  "bread salesman" "stockman" salesperson "shoe buyer/salesman"
"salesman, timekeeper" "direct salesman" "sales operator" "local salesman"  "' ;


***Low-end sales ;
/**replace occ1950ej=36 if occ1950==430 | occ1950==460* */ ;
local occ_36_list `"huckster peddlar newsboy "junk peddler" "milk peddlar" peddler 
"fruit huckster" "'  ;

*****Skilled workers, craftsmen ;

/* replace occ1950ej=48 if occ1950>=500 & occ1950<=594 */ ;
local occ_48_list `"baker "head baker" butcher blacksmith "black smith" blacksmithing "blacksmith-proprietor" bookbinder "book binder" boilermaker brickmason  "brick layer" "bricklayer" "brick mason" stonemason "stone mason" "tile setter" cabinetmaker "cabinet maker" carpenter carpernter "carpenter, bridge" "semi-skilled carpenter" "capenter on housework" "carpenter / painter" "coach carpenter" "cement finisher" "concrete finisher"  compositor typesetter "type setter" craneman derrickman hoistman decorator decorating "interior decorator" "window dresser" electrician "elec. supt." "electric welder" metallugrist
electricain "head miller electrician" "electrician (partner)" "electrical operator" "electrical repairman" repairman repairer "electrican" "repair and service man" "repair man"
stereotyper electrotyper engraver "photo engraver" grader hammerman foregman furrier
glazier "glass worker" "galss cutter" "glass cutter" jeweler watchmaker "watchmaker/jeweler" "watch repair" "watchcase repairer" goldsmith silversmith "sterling silver   smith" machinist machinest "general machinist" machine "machine man" "machinery repair man" mechanist mechanic machanic "master mechanic" miller millwright molder moulder "skilled moulder" "moulder helper" optician "manufacturing optician" painter paperhanger "painting/paper hanging" "piano tuner" "organ tuner" plasterer plumber fitter "pipe fitter" roofer slater pressman "press worker" tailor "stone cutter" "car repairman" "auto repairman"  "iron dripper" "iron worker"
lineman "chief lineman" "lineman (repair)" "locomotive lineman"  "auto mechanic" "car builder" "auto mechanis" "auto mechanc" "auto repair man" "automobile mechanic" "automobile mechanics"
"brass molder"  "electrical welder"  "welder and electrician"
"maintenance man" "mill wright" "mill right" printer printer--pressman "printing press machinist" presser telephonerepailman  "printer & decortaor"
tinner "tinner sheet metal work" "roofer and tinsmith" "copper smith" "too maker" "tool grinder" "tool maker" "tool maker machinest" "tool man"  "paint supt" "painter &decorator" "painter and decorator" "painter and decorating" "painter and paperhanger" "painter/decorator" "painting" "paper hangers and painter" "general painter" roler "roll hand" "roll turner" "roller" "assembler" "automotive electrician" "boiler maker" "boiler-maker"  "boiler maker helper" "boiler maker's helper" "boilermaker's helper"  "brewer master" "bridge carpenter" "general maintenance mechanic and helper"
"mach helper" "machinist helper" "machinist's helper" "machinists helper"
 "mechanic helper" "mechanic's helper" 
"painter and paperhanger--helper" "pressman helper" "carpenter helper"
"helper plumber" "assistant boiler maker"  
"diamond setter" "die cutter" "die maker" "die molder" "die setter" "tuner"
"mechanic auto" "paper cutter" "job printer"  "gear cutter" 
"presser and delivery man"   "patternmaker"
 "sheet metal worker" "loom fixer"
"subintendent construction" "cable splicer" "shoe cutter" "lock maker" 
"watch maker"  "meter installer" shoemaker cobbler "shoe repair man"  "shoe repairer" "shoe rebuilder" "lining cutter" riveter "body mechanic"  "telephone installer" "steam fitter" papermaker "car man helper"  "steel hardner" "skilled labor" "skilled laborer" "paper bolt checker"
"boiler inspecter"  "wood pattern maker" "' ;
     


/*** Semi-skilled
replace occ1950ej=51 if occ1950>=600 & occ1950<=690 **/ ;

local occ_51_list `"operative blaster powderman boatman canalman "lock keepers"
brakeman breakman "freight brakeman" "bus driver" busdriver truckdriver "trick driver" "truck driver" "truck driving" "truck    driver" trucker trucking "truck operator" " motor truck driver" "motor truck driver" "truck driver and delivery" "chauffeur-truck driver" axman axmait chainman rodman "bus conductor" deliveryman "bread truck driver and salesman"
 "delivery man" "delivery boy" routeman dressmaker seamstress dyer filer grinder polisher "fruit grader" "nut grader" furnaceman smelterman pourer "meat cutter" milliner "extra conductor or motorman" motorman oiler  sailor sawyer "shingle sawyer" spinner weaver welder "city truck driver" "taxi driver" "cab driver" "freight trucker" "tractor driver" "ambulance driver" "bus operator" "milk driver" miner "asphalt worker" 
"cement mixer" "cement worker" cutter doffer "doffer hand"
"driver of ice wagon" "drives truck" "laundry deliveryman" switchman
switchmen swithchman "car blocker" "plastering" "carrier driver"
conductor "street car conductor" "st. car operator" "street car operator" "freight conductor" "pullman conductor" hostler "extra conductor or motorman" "barge pilot" "bar pilot" 
"truck driver helper" "helper truck driver" "funeral car chauffeur"
"screw machine operator" "ry brakeman" brakeman  "local switchman" switchman flagman "truck backery driver"  "signal man" "laborer semi-skilled"
"bottle machine operator"  "car operator"  "car operator" leverman  "lever man"
"crane operator" "machine operator" "mach. operator" "drilling machine operator"
"linotype operator" "operator" "operator key punching machine" " operator screw machine" "thread machine operator"  "operator screw machine" "operator coating machine"  "automatic machine operator" "cut off saw operator" " automatic machine operator "  "slotter/machine operator" "screw machine operator" "auto wrecking" "linetype operator"
"powerr shovel operator" "punch press operator" "steam shovel operator"
"tender-coating machine" "semi-skill labor" "grinding machine operator" 
"press operator" "bulk station operator" "electric pump operator"
"transmission assembler" "machine lying operator" "warpe hanger" "sizing warp" warper twister
"saw filer" "engine watchman" "wood cutting machine operator"  "power machine operator" 
"lineaty plate operator" "load checker" "cotton grader" "casing grader"
"cotton sampler"  "' ;


/* Service workers 1 (not private households)
replace occ1950ej=68 if occ1950>=700 & occ1950<=790 */ ;

local occ_68_list `"bartender "bar tender" bootblack charwoman doorkeeper janitor custodian "clean-up man" "chief custodian"  sexton midwife porter poroter "coach cleaner" "car cleaner" "water porter" usher waiter waitress "elevator operator" "express baggageman" "baggage  man" barber beautician "bell help" "chamber-maid" "assistant janitor" "bldg custodian" "custodian-tennis courts" "hairdresser" "dining car waiter" "automobile parker" "barber and shave cubbling"
"porter (building)" "manager soda fountain" "ice cream maker and general worker"
"red cap"  "window cleaner" "window washer" laundry washer cool "clothes  puller"  "' ;



/** Service 2 (protective)
replace occ1950ej=61 if occ1950==595 | occ1950==762 | occ1950==763 | ///
	occ1950==771 | occ1950==773 | occ1950==782 | occ1950==785 **/ ;
	
local occ_61_list `"soldier army sheriff sherrif bailiff "court bailiff" guard policeman "police chief"
"police duty" "merchant police" fireman  "fire chief.driver" "fire chief"  "hoseman"
watchman "night watchman" nightman detective marshal constable captain major "law enforcement" "patrolman" "police officer" "police sargeant" "police sargent" "police sergeant" sergeant
"poiceman" "police cheif" "police lieutenant" "assistant fire chief" 
"fire chief.driver " "locomotive fireman" "marine fireman"
"city fireman" "city marshall" "city policeman" "bank guard" "boiler fireman" "lieut. fireman"
"traffic  manager" "traffic manager" "deputy sheriff"
"light department/stationary fireman"  "drawbridge superintendant"
"senior captain" "supervising sargent" "stationary fireman"
"railway fireman" "railway fireman"  "chief of police" "fire department"
"night watch and fireman"  "special policeman" "railroad police/special agent/personal, confidential work" "locomotive frieman" "steamshovel fireman"
"master captain/mariner"  "master of tug boat" "armed guard" "' ;	



/* Service workers 3 (PRIVATE HOUSEHOLDS);
replace occ1950ej=65 if occ1950>=700 & occ1950<=790 */ ;

local occ_65_list `"housekeeper laundress maid butler cook "assistant cook" 
chauffeur chauffer chaffeur chaoffer driver "private chauffeur"
"servant/yardman" "yard man" "houseboy and chauffeur" houseman housework
"house work" "truck helper/handy man" "' ;



****Unskilled non-farm laborer ;
/* replace occ1950ej=78 if occ1950>=910 & occ1950<=970 */ ;
local occ_78_list `"fisherman oysterman gardener gardner longshoreman
"longshore man" longshorman stevedore "ship loader"  timberman "cutting timber"
 landscaping lumberman raftsman woodchopper teamster laborer 
"laborer for wpa" "laborer for wpa  " "laborer coal hiker" laborerr "car washer" "ditch digger" digger "road work"
ditcher "general labor" "general helper" "garbage collector"
"garbageman" "factory worker" "pick & shovel laboerer" 
"pick and shovel" "pick and shovel laborer"  "pick and shovel man"
"pixk and shovel laborer"  "road laborer" "common laborer" "common labor"
 "garbage collector" "car washer" greaser "dishwasher"
"unskilled labor"  "prek & shovel man" "wheel barrow man"
"laborer for wpa " "general laborer" "highway labor" "wpa road laborer"
"street laborer" "wpa laborer" "yard labor" "day laborer" labor
"laborer factory work" "unskilled laborer" laboreer "gen. laborer"
"coal mine loader" "car unloader" "cmmon labor" "laborer repairing tracks"
"laborer (unskilled)" "laborer revolver miller" "section laborer"
"labor and cotton sampler" "town laborer" "laborer,manual" "mill worker"
"yardhand" "unskilled yardmman" worker "yard cleaner" "steel worker"  "' ;


*****Farm laborers ;
local occ_71_list `" "farm laborer" "farm hand" "laborer general farm" 
"cotton chopper" "farm hand" "farm laborer" "general farm labor"
"general ranch work" "fruit picker" "picking hops" "cleaning grass seed" "' ; 

*********Farm operator & Famers ;
local occ_81_list `" "farm operator" farmer farming "farm maiagent"
"farm agent"  "dairy farmer" "operates hatchery" "produce grower and chicken raiser" "poultry man"  
"merchant farmer" "tenant farmer" "share tenant" "share cropper farm" sharecropper grower
"chick hatchery proprietor"  "tenant operator" "' ;



***************************************************************;
******	ASSIGN A CATEGORY TO THOSE I WONT EVEN TRY TO CODE   **;
***		Either true missings or illegible ;
***************************************************************;
replace occ1_harm=999 if occ1=="" ;
local occ_999_list `"retired  "second prifessional" "tuck paint (?)" "no reply"
"? (illegible)" unemployed "no income" none "' ;


***********************************************************************;
******ASSIGN A CATEGORY TO ONES THAT JUST SEEM REALLY OBSCURE/Hard   **;
***********************************************************************;

local occ_998_list `" "collander man" "freight chicken" "' ;

foreach num in 17 18 21 28 31 32 34 35 36 48 51 68 61 65 71 78 81 999{ ;
di "LIST NUMBER = `num'" ;
foreach name in `occ_`num'_list' { ;
di "`name'" ;
replace occ1_harm=`num' if occ1=="`name'" ;
} ;
} ;

***Assign all clerks not already assigned as something else to 32;
replace occ1_harm=32 if strpos(occ1, "clerk")~=0 & occ1_harm==. ;

***Assign all superintendents not already someting else to 28 ;
replace occ1_harm=28 if strpos(occ1, "superintendent")~=0 & occ1_harm==. ;
replace occ1_harm=28 if strpos(occ1, "supt.")~=0 & occ1_harm==. ;
replace occ1_harm=28 if strpos(occ1, "supertendent")~=0 & occ1_harm==. ;

***Assign all non-self-employed supervisors not already someting else to 28 ;
replace occ1_harm=28 if strpos(occ1, "supervisor")~=0 & occ1_harm==. & self_or_wage~=1 ;

***Assign all contractors not already something else to 42 ;
replace occ1_harm=42 if strpos(occ1, "contractor")~=0 & occ1_harm==. ;
replace occ1_harm=42 if strpos(occ1, "contrcator")~=0 & occ1_harm==. ;

***Assign all collectors not already something else to 32 ;
replace occ1_harm=32 if strpos(occ1, "collector")~=0 & occ1_harm==. ;

***Assign all self-employed owners to 21 if not already coded something else ;
replace occ1_harm=21 if strpos(occ1, "owner")~=0 & occ1_harm==. & self_or_wage==1 ;

***Assign all salaried managers to 28 if not already coded ;
replace occ1_harm=28 if strpos(occ1, "manager")~=0 & occ1_harm==. & self_or_wage==2 ;

***Assign all self-emp managers to 21 if not already coded ;
replace occ1_harm=21 if strpos(occ1, "manager")~=0 & occ1_harm==. & self_or_wage==1 ;

***Assign all inspectors/investigators to 28 ;
replace occ1_harm=28 if strpos(occ1, "inspector")~=0 & occ1_harm==. ;
replace occ1_harm=28 if strpos(occ1, "investigator")~=0 & occ1_harm==. ;

***Hand-enter ones that depend also on industsry ;
***Hired hand in farming would be farm laborer, but hired hand in industry woudl be unskilled laborer ;
replace occ1_harm=71 if occ1=="hired hand" & ind1=="FARMING" ;
replace occ1_harm=78 if occ1=="all round hand" & ind1=="COTTON MILL" ;
replace occ1_harm=71 if occ1=="labourer" & ind1=="FARMING" ;
replace occ1_harm=78 if occ1=="odd jobs" & ind1=="INDEPENDENT" ;
replace occ1_harm=71 if occ1=="ranch laborer" & ind1=="ALFALFA & FRUIT Ranch" ;
replace occ1_harm=71 if occ1=="ranch labor" & ind1=="CITRUS RANCH" ;
replace occ1_harm=65 if occ1=="yardman laborer" & ind1=="PRIVATE HOMES, ODD JOBS" ;

***Low-wage jobs for WPA ;
replace occ1_harm=78 if occ1=="laying pipe" & ind1=="WPA sewage construction" ;
replace occ1_harm=78 if occ1=="rockmason's helper" & ind1=="SEWAGE CONSTRUCTION (WPA)" ;
replace occ1_harm=78 if occ1=="wheelbarrow operator" & ind1=="WPA ROAD" ;


***Miscellaneous ;
replace occ1_harm=18 if occ1=="director" & ind1=="FUNERAL HOME" ;
replace occ1_harm=48 if occ1=="apprentice" & ind1=="electrician" ;
replace occ1_harm=28 if occ1=="vice president" & ind1=="canning plant" ;
replace occ1_harm=28 if occ1=="vice president" & ind1=="RETAIL CLOTHING COMPAANY" ;
replace occ1_harm=61 if occ1=="officer" & ind1=="ship" ;
replace occ1_harm=18 if occ1=="director" & ind1=="funeral parlor" ;
replace occ1_harm=17 if occ1=="organizer" & ind1=="fraternal organization/boy scouts" ;
**The below guys are checkers in some kind of agricultural setting, so 51 ;
replace occ1_harm=51 if occ1=="checker" & ind1=="wholesale fruit and produce co" ;
replace occ1_harm=51 if occ1=="checker" & ind1=="creosote plant" ;
**Inspector in manufacturing setting, so 48 ;
replace occ1_harm=48 if occ1=="inspecter" & ind1=="glass warefactory" ;
replace occ1_harm=21 if occ1=="dealer" & ind1=="wholesale automobles" ;
**Below is a carrier at a farm, so will classify as sorter/grader of ag, so 51? ;
replace occ1_harm=51 if occ1=="carrier" & ind1=="farm produce" ;
replace occ1_harm=32 if occ1=="carrier" & ind1=="u.s. mail" ;

